package org.jeecg.modules.mes.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 工种类型定义表（多租户）
 */
@Data
@TableName("mes_work_type")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "mes_work_type对象", description = "工种类型定义表")
public class MesWorkType implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键ID")
    private String id;

    /**
     * 工种编码
     */
    @Excel(name = "工种编码", width = 15)
    @ApiModelProperty(value = "工种编码")
    private String workTypeCode;

    /**
     * 工种名称
     */
    @Excel(name = "工种名称", width = 15)
    @ApiModelProperty(value = "工种名称")
    private String workTypeName;

    /**
     * 工种描述
     */
    @Excel(name = "工种描述", width = 30)
    @ApiModelProperty(value = "工种描述")
    private String description;

    /**
     * 排序
     */
    @Excel(name = "排序", width = 10)
    @ApiModelProperty(value = "排序")
    private Integer sortOrder;

    /**
     * 状态(0-停用,1-启用)
     */
    @Excel(name = "状态", width = 10, dicCode = "valid_status")
    @ApiModelProperty(value = "状态(0-停用,1-启用)")
    @Dict(dicCode = "valid_status")
    private Integer status;

    /**
     * 备注
     */
    @Excel(name = "备注", width = 30)
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createBy;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private String updateBy;

    /**
     * 更新时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    /**
     * 租户ID（多租户支持）
     */
    @ApiModelProperty(value = "租户ID")
    private Integer tenantId;
}
